package com.tuanzi.loan.business.service.family.impl;

import com.tuanzi.loan.business.entity.family.StatNewCreditCardUv;
import com.tuanzi.loan.business.repository.family.StatNewCreditCardUvRepository;
import com.tuanzi.loan.business.service.family.StatNewCreditCardUvService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.service.CommonServiceImpl;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.StatNewCreditCardUvRequest;
import com.tuanzi.loan.vo.response.family.StatNewCreditCardUvResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * User: liangZongXi
 * Create time: 19:28 2018/9/6
 * Description:
 */
@Debug
@Service
@Transactional
@Retryable(value = { RetryException.class })
public class StatNewCreditCardUvServiceImpl extends CommonServiceImpl<StatNewCreditCardUv, Long> implements StatNewCreditCardUvService {

    @Autowired
    private StatNewCreditCardUvRepository statNewCreditCardUvRepository;

    @Override
    public Page<StatNewCreditCardUvResponse> list(PageSearcher<StatNewCreditCardUvRequest> pageSearcher) {
        return statNewCreditCardUvRepository.list(pageSearcher.getSearchCondition(), pageSearcher.getPageable());
    }

    @Override
    protected JpaRepository<StatNewCreditCardUv, Long> getRepository() {
        return statNewCreditCardUvRepository;
    }
}
